home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
mp3pla2a
/
seek.frm
< prev
next >
Wrap
Text File
|
1999-01-20
|
15KB
|
448 lines
VERSION 5.00
Begin VB.Form WinSeek
BackColor = &H00000000&
BorderStyle = 0 'None
Caption = "Buscador de Mp3"
ClientHeight = 4050
ClientLeft = 6780
ClientTop = 1140
ClientWidth = 6105
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000080&
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4050
ScaleWidth = 6105
ShowInTaskbar = 0 'False
Begin VB.PictureBox Picture3
BackColor = &H00000000&
Height = 3870
Left = 30
ScaleHeight = 3810
ScaleWidth = 5955
TabIndex = 0
Top = 75
Width = 6015
Begin VB.PictureBox Picture1
BackColor = &H00000000&
BorderStyle = 0 'None
Height = 3060
Left = 30
ScaleHeight = 3060
ScaleWidth = 5865
TabIndex = 5
Top = 60
Width = 5865
Begin VB.TextBox txtSearchSpec
BackColor = &H00000000&
ForeColor = &H00FFFFFF&
Height = 285
Left = 3450
TabIndex = 9
Text = "*.mp?"
Top = 90
Width = 2415
End
Begin VB.FileListBox filList
BackColor = &H00000000&
ForeColor = &H0000FF00&
Height = 2430
Left = 120
MultiSelect = 2 'Extended
Pattern = "*.mp3"
TabIndex = 8
Top = 480
Width = 3225
End
Begin VB.DirListBox dirList
BackColor = &H00000000&
ForeColor = &H0000FFFF&
Height = 1890
Left = 3420
TabIndex = 7
Top = 975
Width = 2415
End
Begin VB.DriveListBox drvList
BackColor = &H00000000&
ForeColor = &H00FFFFFF&
Height = 315
Left = 3435
TabIndex = 6
Top = 495
Width = 2415
End
Begin VB.Label lblCriteria
BackStyle = 0 'Transparent
Caption = "&Criterio de b·squeda:"
ForeColor = &H00FFFFFF&
Height = 255
Left = 1365
TabIndex = 10
Top = 105
Width = 1875
End
End
Begin VB.PictureBox Picture2
BackColor = &H00000000&
BorderStyle = 0 'None
Height = 2895
Left = 285
ScaleHeight = 2895
ScaleWidth = 4935
TabIndex = 1
Top = 0
Visible = 0 'False
Width = 4935
Begin VB.ListBox lstFoundFiles
BackColor = &H00000000&
ForeColor = &H0000FF00&
Height = 2400
Left = 600
TabIndex = 2
Top = 390
Width = 4815
End
Begin VB.Label lblfound
BackColor = &H00000000&
Caption = "&Temas encontrados:"
ForeColor = &H00FFFFFF&
Height = 255
Left = 120
TabIndex = 4
Top = 120
Width = 1935
End
Begin VB.Label lblCount
BackColor = &H00000000&
Caption = "0"
ForeColor = &H00FFFFFF&
Height = 255
Left = 2160
TabIndex = 3
Top = 120
Width = 555
End
End
Begin VB.Image boto
Height = 585
Index = 0
Left = 150
Picture = "seek.frx":0000
Top = 3120
Width = 1020
End
Begin VB.Image boto
Height = 570
Index = 1
Left = 2580
Picture = "seek.frx":1F56
Top = 3105
Width = 990
End
Begin VB.Image boto
Height = 570
Index = 3
Left = 4710
Picture = "seek.frx":3D48
Top = 3105
Width = 1005
End
Begin VB.Image boto
Height = 600
Index = 2
Left = 3615
Picture = "seek.frx":5BD2
Top = 3075
Width = 1005
End
End
End
Attribute VB_Name = "WinSeek"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim SearchFlag As Integer ' Se usa como indicador para cancelar y otras operaciones.
Dim mouseIsDown As Boolean
Dim cx As Single
Dim cy As Single
Dim a
Private Sub cmdExit_Click()
End Sub
Private Function DirDiver(NewPath As String, DirCount As Integer, BackUp As String) As Integer
' Busca recursivamente en directorios desde NewPath hacia abajo...
' Se busca en NewPath en este paso recursivo.
' BackUp es el origen de este paso recursivo.
' DirCount es el n·mero de subdirectorios de este directorio.
Static FirstErr As Integer
Dim nombre
Dim nomb
Dim DirsToPeek As Integer, AbandonSearch As Integer, ind As Integer
Dim OldPath As String, ThePath As String, entry As String
Dim retval As Integer
SearchFlag = True ' Establece el indicador de modo que el usuario pueda interrumpir.
DirDiver = False ' Lo establece a True si hay un error.
retval = DoEvents() ' Comprueba si hay eventos (por ejemplo, si el usuario elige Cancelar).
If SearchFlag = False Then
DirDiver = True
Exit Function
End If
On Local Error GoTo DirDriverHandler
DirsToPeek = dirList.ListCount ' ┐Cußntos directorios hay debajo de Θste?
Do While DirsToPeek > 0 And SearchFlag = True
OldPath = dirList.Path ' Guarda la ruta de acceso anterior para el pr≤ximo paso recursivo.
dirList.Path = NewPath
If dirList.ListCount > 0 Then
' Obtiene hasta la parte inferior del nodo.
dirList.Path = dirList.List(DirsToPeek - 1)
AbandonSearch = DirDiver((dirList.Path), DirCount%, OldPath)
End If
' Sube un nivel en los directorios.
DirsToPeek = DirsToPeek - 1
If AbandonSearch = True Then Exit Function
Loop
' Llama a una funci≤n para enumerar archivos.
If filList.ListCount Then
If Len(dirList.Path) <= 3 Then ' Comprueba 2 bytes/carßcter
ThePath = dirList.Path ' Si estß a nivel raφz, lo deja como estß...
Else
ThePath = dirList.Path + "\" ' De lo contrario, pone "\" delante del nombre de archivo.
End If
For